<?php /*a:7:{s:68:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\user\mypost.html";i:1660184965;s:63:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\layout.html";i:1659685605;s:68:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\meta.html";i:1659584544;s:70:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\script.html";i:1659584105;s:70:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\header.html";i:1660015203;s:68:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\menu.html";i:1660191692;s:70:"D:\phpstudy_pro\WWW\ThinkPHP\k2217ASK\app\home\view\common\footer.html";i:1659584054;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
<title>ask论坛</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="keywords" content="fly,layui,前端社区">
<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
<link rel="stylesheet" href="/static/home/res/layui/css/layui.css">
<link rel="stylesheet" href="/static/home/res/css/global.css">


    <!-- 引入js -->
    <script src="/static/home/res/layui/layui.js"></script>
<script>
    layui.cache.page = '';
    layui.cache.user = {
        username: '游客'
        , uid: -1
        , avatar: '/static/home/res/images/avatar/00.jpg'
        , experience: 83
        , sex: '男'
    };
    layui.config({
        version: "3.0.0"
        , base: '/static/home/res/mods/' //这里实际使用时，建议改成绝对路径
    }).extend({
        fly: 'index'
    }).use('fly');
</script>
</head>

<body>
    <!-- 公共头部 -->
    <div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="<?php echo url('/'); ?>">
            <img src="/static/home/res/images/logo.png" alt="layui">
        </a>

        <?php if((app('request')->action() !== 'login' && app('request')->action() !== 'register')): ?>
        <ul class="layui-nav fly-nav-user">

            <!-- 未登入的状态 -->
            <?php if((!app('request')->cookie('LoginUser'))): ?>
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" href="user/login.html"></a>
            </li>
            <li class="layui-nav-item">
                <a href="<?php echo url('/home/index/login'); ?>">登入</a>
            </li>
            <li class="layui-nav-item">
                <a href="<?php echo url('/home/index/register'); ?>">注册</a>
            </li>
            <?php else: ?>

            <!-- 登入后的状态 -->

            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="javascript:;">
                    <cite class="layui-hide-xs"><?php echo htmlentities($LoginUser['nickname']); ?></cite>
                    <?php if(($LoginUser['auth'] == 1)): ?>
                    <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：<?php echo htmlentities($LoginUser['nickname']); ?>"></i>
                    <?php endif; ?>
                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP <?php echo htmlentities($LoginUser['vip']); ?></i>
                    <img
                        src="<?php echo !empty($LoginUser['avatar']) ? '/' . $LoginUser['avatar']  :  '/static/home/res/images/avatar/default.png'; ?>">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="<?php echo url('/home/user/profile'); ?>"><i class="layui-icon">&#xe620;</i>基本资料</a></dd>
                    <dd><a href="user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                    <dd><a href="/home/user"><i class="layui-icon"
                                style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                    <hr style="margin: 5px 0;">
                    <dd><a href="<?php echo url('home/index/logout'); ?>" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
            <?php endif; ?>
        </ul>
        <?php endif; ?>
    </div>
</div>

    <!-- 输出子内容 -->
    <!DOCTYPE html>
<html>
<div class="layui-container fly-marginTop fly-user-main">
    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
    <li class="layui-nav-item">
        <a href="<?php echo url('/home/user/index'); ?>">
            <i class="layui-icon">&#xe609;</i>
            我的主页
        </a>
    </li>
    <!-- <li class="layui-nav-item">
        <a href="index.html">
            <i class="layui-icon">&#xe612;</i>
            用户中心
        </a>
    </li> -->
    <li class="layui-nav-item <?php echo $action=='profile' ? 'layui-this' : ''; ?>">
        <a href="<?php echo url('/home/user/profile'); ?>">
            <i class="layui-icon">&#xe620;</i>
            基本资料
        </a>
    </li>
    <li class="layui-nav-item <?php echo $action=='mypost' ? 'layui-this' : ''; ?>">
        <a href="/home/user/mypost">
            <i class="layui-icon">&#xe611;</i>
            我的发表
        </a>
    </li>
</ul>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>


    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-col-md8">
            <div class="fly-panel" style="margin-bottom: 0;">
                <div class="fly-panel-title fly-filter">
                    <a href="<?php echo url('/home/user/mypost'); ?>" class="<?php echo $state=='' ? 'layui-this'  :  ''; ?>">综合</a>
                    <span class="fly-mid"></span>
                    <a href="<?php echo url('/home/user/mypost',['state' => 1]); ?>"
                        class="<?php echo $state==='1' ? 'layui-this'  :  ''; ?>">置顶</a>
                    <span class="fly-mid"></span>
                    <a href="<?php echo url('/home/user/mypost',['state' => 2]); ?>"
                        class="<?php echo $state==='2' ? 'layui-this'  :  ''; ?>">精华</a>
                    <span class="fly-mid"></span>
                    <a href="<?php echo url('/home/user/mypost',['state' => 3]); ?>"
                        class="<?php echo $state==='3' ? 'layui-this'  :  ''; ?>">热门</a>
                    <span class="fly-mid"></span>
                    <a href="<?php echo url('/home/user/mypost',['state' => 0]); ?>"
                        class="<?php echo $state==='0' ? 'layui-this'  :  ''; ?>">常规</a>
                    <span class="fly-filter-right layui-hide-xs">
                        <a href="<?php echo url('/home/user/mypost',['state' => $state,'accept' => '0']); ?>"
                            class="<?php echo $accept==='0' ? 'layui-this'  :  ''; ?>">未采纳</a>
                        <span class="fly-mid"></span>
                        <a href="<?php echo url('/home/user/mypost',['state' => $state,'accept' => '1']); ?>"
                            class="<?php echo $accept==='1' ? 'layui-this'  :  ''; ?>">已采纳</a>
                    </span>
                </div>
                <ul class="fly-list">
                    <?php foreach($PostList as $item): ?>
                    <li>
                        <a href="<?php echo url('/home/user/index',['userid' => $item['user']['id']]); ?>" class="fly-avatar">
                            <img src="<?php echo !empty($item->user->avatar) ? '/' . $item->user->avatar  :  'static/home/res/images/avatar/default.png'; ?>"
                                alt="贤心">
                        </a>
                        <h2>
                            <a class="layui-badge"><?php echo htmlentities($item->type->name); ?></a>
                            <a href="<?php echo url('/home/post/info',['postid' => $item['id']]); ?>"><?php echo htmlentities($item->title); ?></a>
                        </h2>
                        <div class="fly-list-info">
                            <a href="<?php echo url('/home/user/index',['userid' => $item->user->id]); ?>" link>
                                <cite><?php echo htmlentities($item->user->nickname); ?></cite>

                                <?php if($item->user->auth == 1): ?>
                                <i class="iconfont icon-renzheng" title="认证信息：<?php echo htmlentities($item->user->nickname); ?>"></i>
                                <?php endif; if($item->user->vip > 0): ?>
                                <i class="layui-badge fly-badge-vip">VIP <?php echo htmlentities($item->user->vip); ?></i>
                                <?php endif; ?>
                                <!--
					
					<i class="layui-badge fly-badge-vip">VIP3</i>
					-->
                            </a>
                            <span><?php echo htmlentities(date("Y-m-d",!is_numeric($item->createtime)? strtotime($item->createtime) : $item->createtime)); ?></span>

                            <span class="fly-list-kiss layui-hide-xs" title="悬赏积分"><i class="iconfont icon-kiss"></i>
                                <?php echo htmlentities($item->point); ?></span>
                            <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->
                            <span class="fly-list-nums">
                                <i class="iconfont icon-pinglun1" title="回答"></i> <?php echo htmlentities($item->comment_count); ?>
                            </span>
                        </div>
                        <div class="fly-list-badge">
                            <!--<span class="layui-badge layui-bg-red">精帖</span>-->
                        </div>
                    </li>
                    <?php endforeach; ?>
                </ul>
                <div style="text-align: center">
                    <?php echo $PostList; ?>
                </div>

            </div>
        </div>
    </div>

</div>
</body>
<html>

    <!-- 底部 -->
    <div class="fly-footer">
    <p>2017 &copy; <a href="http://www.layui.com/" target="_blank">Fly技术社区</a></p>
</div>

</body>

</html>